package com.jams.goodox.adapter;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jams.goodox.R;
import com.jams.goodox.entity.Suggestion;

import java.util.List;

/**
 * Created by Jin on 2016/5/17.
 * Description 建议列表
 */
public class IndexSuggestListAdapter extends BaseQuickAdapter<Suggestion.DataBean.ResultListBean> {

	public IndexSuggestListAdapter(List<Suggestion.DataBean.ResultListBean> list) {
		super(R.layout.mine_suggest_list_listview, list);
	}

	@Override
	protected void convert(BaseViewHolder baseViewHolder, Suggestion.DataBean.ResultListBean resultListBean) {
		baseViewHolder.setText(R.id.time, resultListBean.getIntime())
                .setText(R.id.suggestion, resultListBean.getSuggestion())
                .setText(R.id.reply_name, resultListBean.getReplyUserName() + " 回复 :")
                .setText(R.id.reply_content, resultListBean.getReply())
                .setText(R.id.reply_time, resultListBean.getReplyTime());
		baseViewHolder.getView(R.id.reply_layout).setVisibility(
				resultListBean.getReplyStatus() == 0  ? View.GONE : View.VISIBLE);
	}
}
